<link href="/public/static/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
    <link href="/public/static/css/font-awesome.min.css" rel="stylesheet" type="text/css" />
    <link href="/public/static/plugin/AdminLTE/css/AdminLTE.css" rel="stylesheet" type="text/css" />
    <link href="/public/static/plugin/AdminLTE/css/AdminLTE-singular.css" rel="stylesheet" type="text/css" />

    <!-- 基础自定义css -->
    <link href="/public/static/css/normal.css" rel="stylesheet" type="text/css" />
    <link href="/public/static/plugin/jqueryui/jquery.ui.css" rel="stylesheet" type="text/css" />
    <!-- chosen.js -->
    <link href="/public/static/plugin/chosen/chosen.css" rel="stylesheet" type="text/css" />
    
     <!-- Date Picker -->
    <link href="/public/static/plugin/datetimepicker/bootstrap-datetimepicker.css" rel="stylesheet" type="text/css" />
    <!-- Daterange picker -->
    <link href="/public/static/plugin/AdminLTE/css/daterangepicker/daterangepicker-bs3.css" rel="stylesheet" type="text/css" />

    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
    <script src="/public/static/js/html5shiv.js"></script>
    <script src="/public/static/js/respond.min.js"></script>
    <![endif]-->

    <!-- add new calendar event modal -->

    <!-- Start  基础脚本1 -->
    <script src="/public/static/js/jquery.min.js"></script>
    <script src="/public/static/js/bootstrap.min.js" type="text/javascript"></script>
    <script src="/public/static/plugin/jqueryui/jquery.ui.js" type="text/javascript"></script>
    <!-- End    基础脚本1 -->	
    <script src="/public/static/plugin/layer/layer.js"></script>
    <script src="/public/static/plugin/chosen/chosen.jquery.js" type="text/javascript"></script>
    
    <!-- daterangepicker -->
    <script src="/public/static/plugin/AdminLTE/js/plugins/daterangepicker/daterangepicker.js" type="text/javascript"></script>
    <!-- datepicker -->
    <script src="/public/static/plugin/datetimepicker/bootstrap-datetimepicker.js" type="text/javascript"></script>
    

<style>
table{font-size: 12px;}
   

</style>

<div class="banuser">
	
	 <form method="post" action="/oss/?r=banUser/doAdd">
    <{include file='../common_params.tpl'}>

    <div class="box box-black">
        <div class="box-body">
            <table class="table table-bordered" style="margin-top: 10px;">
                <colgroup>
                    <col style="width: 20%;"></col>
                    <col style="width: 80%;"></col>
                </colgroup>
                
                <tr>
                    <th class="th-label">封禁频道</th>
                    <td>
                        <select name="ban_channel" class="form-control inline" style="width: 200px;">
                            <{html_options options=$channelType}>
                        </select>
                    </td>
                </tr>
                
                <tr>
                    <th class="th-label">封禁截止日期</th>
                    <td>
                        <input type="text" name="ban_date" class="form-control inline time" />
                        <label><input type="checkbox" name="ban_forever" class="simple" id="ban-forever" />永久</label>
                    </td>
                </tr>

                <tr>
                    <th class="th-label">封禁原因</th>
                    <td>
                        <textarea class="form-control" name="reason" rows="5"></textarea>
                    </td>
                </tr>
            </table>
        </div>
    </div>
</form>
		
</div>

<script>
	    $(".time").datetimepicker({
            format: 'yyyy-mm-dd hh:ii:00',
            datemode: 'dmUpDown',
            fontAwesome: true,
            todayBtn:  true,
            todayHighlight: true,
            autoclose: true,
//          startView: 2,
//          minView: 2
        });

        $("#ban-forever").click(function(){
            var timeInput = $(this).closest('td').find('.time');
            if($(this).is(":checked")){
                timeInput.prop('disabled', true);
            }else{
                timeInput.prop('disabled', false);
            }
        });
        
    function callbackdata(){
    	var arr = new Array();
    	var ban_channel = $('select[name="ban_channel"]').val();
    	var ban_date = $('input[name="ban_date"]').val();
    	var reason = $('textarea[name="reason"]').val();
    	if($("input[name='ban_forever']").is(':checked')){
    		ban_forever = 1; //选中
    	}else{
    		ban_forever = 2; //没选中
    	}
    	arr[0] = ban_date;
    	arr[1] = ban_forever;
    	arr[2] = reason;
    	arr[3] = ban_channel;
    	return arr;
    }
</script>



